function isCanvasSupported() { 		//http://diveintohtml5.info
	return !!document.createElement('canvas').getContext;
}

function isCanvas2DContextSupported() {
	if (!isCanvasSupported()) return false;
	return !!document.createElement('canvas').getContext('2d');
}

function isCanvasWebglContextSupported() {
	if (!isCanvasSupported()) return false;
	try {
		return !!document.createElement('canvas').getContext('experimental-webgl');
	}
	catch(e) {
		return false;
	}
}

function isCanvasTextSupported() {
	if (!isCanvasSupported() || !isCanvas2DContextSupported()) return false;
	return (typeof document.createElement('canvas').getContext('2d').fillText) == 'function';
}

function start_canvas_test() {
	var E = {
		layerName:"Canvas",
		type:	"aggrg",
		nlist:
		{
			"Canvas Element"			: isCanvasSupported(),
			"Canvas 2D Context Support"	: isCanvas2DContextSupported(),	
			"Canvas Text Support"		: isCanvasTextSupported(),
			"Canvas WebGL Support"		: isCanvasWebglContextSupported()
		}
	};
	return E;
}
